home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)Z
/
(A)Z8.ADF
/
WBLander
/
dumpsprite.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-06-27
|
685b
|
28 lines
#include <intuition/intuition.h>
#define INTUITION_REV 1
struct IntuitionBase *IntuitionBase;
main()
{
struct Preferences prefs;
int i;
IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", INTUITION_REV);
if( IntuitionBase == NULL )
{
puts("can't open intuition\n");
exit(-1);
}
GetPrefs(&prefs, sizeof prefs);
printf("USHORT sprite_colors[3] = { 0x%04x, 0x%04x, 0x%04x };\n",
prefs.color17, prefs.color18, prefs.color19);
printf("USHORT sprite[%d] = {\n", POINTERSIZE);
for(i = 0; i < POINTERSIZE; i += 2)
printf("\t0x%04x, 0x%04x%s\n",
prefs.PointerMatrix[i],
prefs.PointerMatrix[i+1],
(i+2<POINTERSIZE)?",":"");
printf("};\n");
}